3.63 \(\int \frac {(c+d \tan (e+f x))^2 (A+B \tan (e+f x)+C \tan ^2(e+f x))}{(a+b \tan (e+f x))^3} \, dx\)
Optimal. Leaf size=597 \[ -\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}-\frac {(b c-a d) \left (a^4 C d-a^2 b^2 (d (A-3 C)+B c)+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^3 f \left (a^2+b^2\right )^2 (a+b \tan (e+f x))}-\frac {\log (\cos (e+f x)) \left (a^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+3 a^2 b \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a b^2 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-b^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )\right )}{f \left (a^2+b^2\right )^3}-\frac {x \left (a^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a^2 b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a b^2 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )}{\left (a^2+b^2\right )^3}+\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-a^3 b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a^2 b^4 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-2 C d^2\right )+3 a b^5 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+b^6 \left (c (2 B d+c C)-A \left (c^2-d^2\right )\right )\right ) \log (a+b \tan (e+f x))}{b^3 f \left (a^2+b^2\right )^3} \]
[Out]
-(a^3*(c^2*C+2*B*c*d-C*d^2-A*(c^2-d^2))-3*a*b^2*(c^2*C+2*B*c*d-C*d^2-A*(c^2-d^2))-3*a^2*b*(2*c*(A-C)*d+B*(c^2-
d^2))+b^3*(2*c*(A-C)*d+B*(c^2-d^2)))*x/(a^2+b^2)^3-(3*a^2*b*(c^2*C+2*B*c*d-C*d^2-A*(c^2-d^2))-b^3*(c^2*C+2*B*c
*d-C*d^2-A*(c^2-d^2))+a^3*(2*c*(A-C)*d+B*(c^2-d^2))-3*a*b^2*(2*c*(A-C)*d+B*(c^2-d^2)))*ln(cos(f*x+e))/(a^2+b^2
)^3/f+(a^6*C*d^2+3*a^4*b^2*C*d^2-3*a^2*b^4*(c^2*C+2*B*c*d-2*C*d^2-A*(c^2-d^2))+b^6*(c*(2*B*d+C*c)-A*(c^2-d^2))
-a^3*b^3*(2*c*(A-C)*d+B*(c^2-d^2))+3*a*b^5*(2*c*(A-C)*d+B*(c^2-d^2)))*ln(a+b*tan(f*x+e))/b^3/(a^2+b^2)^3/f-(-a
*d+b*c)*(a^4*C*d+b^4*(A*d+B*c)+2*a*b^3*(A*c-B*d-C*c)-a^2*b^2*(B*c+(A-3*C)*d))/b^3/(a^2+b^2)^2/f/(a+b*tan(f*x+e
))-1/2*(A*b^2-a*(B*b-C*a))*(c+d*tan(f*x+e))^2/b/(a^2+b^2)/f/(a+b*tan(f*x+e))^2
________________________________________________________________________________________
Rubi [A] time = 1.29, antiderivative size = 597, normalized size of antiderivative = 1.00,
number of steps used = 6, number of rules used = 6, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used =
{3645, 3635, 3626, 3617, 31, 3475} \[ \frac {\left (-a^3 b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a^2 b^4 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-2 C d^2\right )+3 a^4 b^2 C d^2+a^6 C d^2+3 a b^5 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+b^6 \left (c (2 B d+c C)-A \left (c^2-d^2\right )\right )\right ) \log (a+b \tan (e+f x))}{b^3 f \left (a^2+b^2\right )^3}-\frac {\log (\cos (e+f x)) \left (3 a^2 b \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+a^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )-b^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )\right )}{f \left (a^2+b^2\right )^3}-\frac {x \left (-3 a^2 b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )+a^3 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )-3 a b^2 \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b^3 \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )}{\left (a^2+b^2\right )^3}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b f \left (a^2+b^2\right ) (a+b \tan (e+f x))^2}-\frac {(b c-a d) \left (-a^2 b^2 (d (A-3 C)+B c)+a^4 C d+2 a b^3 (A c-B d-c C)+b^4 (A d+B c)\right )}{b^3 f \left (a^2+b^2\right )^2 (a+b \tan (e+f x))} \]
Antiderivative was successfully verified.
[In]
Int[((c + d*Tan[e + f*x])^2*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(a + b*Tan[e + f*x])^3,x]
[Out]
-(((a^3*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 3*a*b^2*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - 3*a^2*
b*(2*c*(A - C)*d + B*(c^2 - d^2)) + b^3*(2*c*(A - C)*d + B*(c^2 - d^2)))*x)/(a^2 + b^2)^3) - ((3*a^2*b*(c^2*C
+ 2*B*c*d - C*d^2 - A*(c^2 - d^2)) - b^3*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + a^3*(2*c*(A - C)*d + B*(c
^2 - d^2)) - 3*a*b^2*(2*c*(A - C)*d + B*(c^2 - d^2)))*Log[Cos[e + f*x]])/((a^2 + b^2)^3*f) + ((a^6*C*d^2 + 3*a
^4*b^2*C*d^2 - 3*a^2*b^4*(c^2*C + 2*B*c*d - 2*C*d^2 - A*(c^2 - d^2)) + b^6*(c*(c*C + 2*B*d) - A*(c^2 - d^2)) -
a^3*b^3*(2*c*(A - C)*d + B*(c^2 - d^2)) + 3*a*b^5*(2*c*(A - C)*d + B*(c^2 - d^2)))*Log[a + b*Tan[e + f*x]])/(
b^3*(a^2 + b^2)^3*f) - ((b*c - a*d)*(a^4*C*d + b^4*(B*c + A*d) + 2*a*b^3*(A*c - c*C - B*d) - a^2*b^2*(B*c + (A
- 3*C)*d)))/(b^3*(a^2 + b^2)^2*f*(a + b*Tan[e + f*x])) - ((A*b^2 - a*(b*B - a*C))*(c + d*Tan[e + f*x])^2)/(2*
b*(a^2 + b^2)*f*(a + b*Tan[e + f*x])^2)
Rule 31
Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]
Rule 3475
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]
Rule 3617
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[
A/(b*f), Subst[Int[(a + x)^m, x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A, C]
Rule 3626
Int[((A_) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2)/((a_.) + (b_.)*tan[(e_.) + (f_.)*
(x_)]), x_Symbol] :> Simp[((a*A + b*B - a*C)*x)/(a^2 + b^2), x] + (Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 + b^2), I
nt[(1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x]), x], x] - Dist[(A*b - a*B - b*C)/(a^2 + b^2), Int[Tan[e + f*x], x
], x]) /; FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && NeQ[a^2 + b^2, 0] && NeQ[A*b - a
*B - b*C, 0]
Rule 3635
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e
_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((b*c - a*d)*(c^2*C - B*c*d + A*d^2)*
(c + d*Tan[e + f*x])^(n + 1))/(d^2*f*(n + 1)*(c^2 + d^2)), x] + Dist[1/(d*(c^2 + d^2)), Int[(c + d*Tan[e + f*x
])^(n + 1)*Simp[a*d*(A*c - c*C + B*d) + b*(c^2*C - B*c*d + A*d^2) + d*(A*b*c + a*B*c - b*c*C - a*A*d + b*B*d +
a*C*d)*Tan[e + f*x] + b*C*(c^2 + d^2)*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] &&
NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] && LtQ[n, -1]
Rule 3645
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*t
an[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[((A*d^2 + c*(c*C - B*d))*(a + b*T
an[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(d*f*(n + 1)*(c^2 + d^2)), x] - Dist[1/(d*(n + 1)*(c^2 + d^2)), I
nt[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*d*(b*d*m - a*c*(n + 1)) + (c*C - B*d)*(b*c
*m + a*d*(n + 1)) - d*(n + 1)*((A - C)*(b*c - a*d) + B*(a*c + b*d))*Tan[e + f*x] - b*(d*(B*c - A*d)*(m + n + 1
) - C*(c^2*m - d^2*(n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c -
a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
Rubi steps
\begin {align*} \int \frac {(c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^3} \, dx &=-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}+\frac {\int \frac {(c+d \tan (e+f x)) \left (2 ((b B-a C) (b c-a d)+A b (a c+b d))-2 b ((A-C) (b c-a d)-B (a c+b d)) \tan (e+f x)+2 \left (a^2+b^2\right ) C d \tan ^2(e+f x)\right )}{(a+b \tan (e+f x))^2} \, dx}{2 b \left (a^2+b^2\right )}\\ &=-\frac {(b c-a d) \left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right )}{b^3 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}+\frac {\int \frac {2 \left (a^4 C d^2-a^2 b^2 \left (c^2 C+2 B c d-3 C d^2-A \left (c^2-d^2\right )\right )+b^4 \left (c (c C+2 B d)-A \left (c^2-d^2\right )\right )+2 a b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right )+2 b^2 \left (2 a b \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )-b^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \tan (e+f x)+2 \left (a^2+b^2\right )^2 C d^2 \tan ^2(e+f x)}{a+b \tan (e+f x)} \, dx}{2 b^2 \left (a^2+b^2\right )^2}\\ &=-\frac {\left (a^3 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a b^2 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a^2 b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )+b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) x}{\left (a^2+b^2\right )^3}-\frac {(b c-a d) \left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right )}{b^3 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}+\frac {\left (3 a^2 b \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-b^3 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \int \tan (e+f x) \, dx}{\left (a^2+b^2\right )^3}+\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-3 a^2 b^4 \left (c^2 C+2 B c d-2 C d^2-A \left (c^2-d^2\right )\right )+b^6 \left (c (c C+2 B d)-A \left (c^2-d^2\right )\right )-a^3 b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )+3 a b^5 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \int \frac {1+\tan ^2(e+f x)}{a+b \tan (e+f x)} \, dx}{b^2 \left (a^2+b^2\right )^3}\\ &=-\frac {\left (a^3 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a b^2 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a^2 b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )+b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) x}{\left (a^2+b^2\right )^3}-\frac {\left (3 a^2 b \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-b^3 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right )^3 f}-\frac {(b c-a d) \left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right )}{b^3 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}+\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-3 a^2 b^4 \left (c^2 C+2 B c d-2 C d^2-A \left (c^2-d^2\right )\right )+b^6 \left (c (c C+2 B d)-A \left (c^2-d^2\right )\right )-a^3 b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )+3 a b^5 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \tan (e+f x)\right )}{b^3 \left (a^2+b^2\right )^3 f}\\ &=-\frac {\left (a^3 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a b^2 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-3 a^2 b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )+b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) x}{\left (a^2+b^2\right )^3}-\frac {\left (3 a^2 b \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )-b^3 \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+a^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )-3 a b^2 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \log (\cos (e+f x))}{\left (a^2+b^2\right )^3 f}+\frac {\left (a^6 C d^2+3 a^4 b^2 C d^2-3 a^2 b^4 \left (c^2 C+2 B c d-2 C d^2-A \left (c^2-d^2\right )\right )+b^6 \left (c (c C+2 B d)-A \left (c^2-d^2\right )\right )-a^3 b^3 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )+3 a b^5 \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) \log (a+b \tan (e+f x))}{b^3 \left (a^2+b^2\right )^3 f}-\frac {(b c-a d) \left (a^4 C d+b^4 (B c+A d)+2 a b^3 (A c-c C-B d)-a^2 b^2 (B c+(A-3 C) d)\right )}{b^3 \left (a^2+b^2\right )^2 f (a+b \tan (e+f x))}-\frac {\left (A b^2-a (b B-a C)\right ) (c+d \tan (e+f x))^2}{2 b \left (a^2+b^2\right ) f (a+b \tan (e+f x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 8.16, size = 2499, normalized size = 4.19 \[ \text {Result too large to show} \]
Antiderivative was successfully verified.
[In]
Integrate[((c + d*Tan[e + f*x])^2*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/(a + b*Tan[e + f*x])^3,x]
[Out]
((-(A*b^4*c^2) + a*b^3*B*c^2 - a^2*b^2*c^2*C + 2*a*A*b^3*c*d - 2*a^2*b^2*B*c*d + 2*a^3*b*c*C*d - a^2*A*b^2*d^2
+ a^3*b*B*d^2 - a^4*C*d^2)*Sec[e + f*x]*(a*Cos[e + f*x] + b*Sin[e + f*x])*(c + d*Tan[e + f*x])^2)/(2*(a - I*b
)^2*(a + I*b)^2*b*f*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^3) + ((a^3*A*c^2 - 3*a*A*b^2*c^2
+ 3*a^2*b*B*c^2 - b^3*B*c^2 - a^3*c^2*C + 3*a*b^2*c^2*C + 6*a^2*A*b*c*d - 2*A*b^3*c*d - 2*a^3*B*c*d + 6*a*b^2*
B*c*d - 6*a^2*b*c*C*d + 2*b^3*c*C*d - a^3*A*d^2 + 3*a*A*b^2*d^2 - 3*a^2*b*B*d^2 + b^3*B*d^2 + a^3*C*d^2 - 3*a*
b^2*C*d^2)*(e + f*x)*Sec[e + f*x]*(a*Cos[e + f*x] + b*Sin[e + f*x])^3*(c + d*Tan[e + f*x])^2)/((a - I*b)^3*(a
+ I*b)^3*f*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^3) + (((3*I)*a^9*A*b^6*c^2 + 3*a^8*A*b^7*c
^2 + (5*I)*a^7*A*b^8*c^2 + 5*a^6*A*b^9*c^2 + I*a^5*A*b^10*c^2 + a^4*A*b^11*c^2 - I*a^3*A*b^12*c^2 - a^2*A*b^13
*c^2 - I*a^10*b^5*B*c^2 - a^9*b^6*B*c^2 + I*a^8*b^7*B*c^2 + a^7*b^8*B*c^2 + (5*I)*a^6*b^9*B*c^2 + 5*a^5*b^10*B
*c^2 + (3*I)*a^4*b^11*B*c^2 + 3*a^3*b^12*B*c^2 - (3*I)*a^9*b^6*c^2*C - 3*a^8*b^7*c^2*C - (5*I)*a^7*b^8*c^2*C -
5*a^6*b^9*c^2*C - I*a^5*b^10*c^2*C - a^4*b^11*c^2*C + I*a^3*b^12*c^2*C + a^2*b^13*c^2*C - (2*I)*a^10*A*b^5*c*
d - 2*a^9*A*b^6*c*d + (2*I)*a^8*A*b^7*c*d + 2*a^7*A*b^8*c*d + (10*I)*a^6*A*b^9*c*d + 10*a^5*A*b^10*c*d + (6*I)
*a^4*A*b^11*c*d + 6*a^3*A*b^12*c*d - (6*I)*a^9*b^6*B*c*d - 6*a^8*b^7*B*c*d - (10*I)*a^7*b^8*B*c*d - 10*a^6*b^9
*B*c*d - (2*I)*a^5*b^10*B*c*d - 2*a^4*b^11*B*c*d + (2*I)*a^3*b^12*B*c*d + 2*a^2*b^13*B*c*d + (2*I)*a^10*b^5*c*
C*d + 2*a^9*b^6*c*C*d - (2*I)*a^8*b^7*c*C*d - 2*a^7*b^8*c*C*d - (10*I)*a^6*b^9*c*C*d - 10*a^5*b^10*c*C*d - (6*
I)*a^4*b^11*c*C*d - 6*a^3*b^12*c*C*d - (3*I)*a^9*A*b^6*d^2 - 3*a^8*A*b^7*d^2 - (5*I)*a^7*A*b^8*d^2 - 5*a^6*A*b
^9*d^2 - I*a^5*A*b^10*d^2 - a^4*A*b^11*d^2 + I*a^3*A*b^12*d^2 + a^2*A*b^13*d^2 + I*a^10*b^5*B*d^2 + a^9*b^6*B*
d^2 - I*a^8*b^7*B*d^2 - a^7*b^8*B*d^2 - (5*I)*a^6*b^9*B*d^2 - 5*a^5*b^10*B*d^2 - (3*I)*a^4*b^11*B*d^2 - 3*a^3*
b^12*B*d^2 + I*a^13*b^2*C*d^2 + a^12*b^3*C*d^2 + (5*I)*a^11*b^4*C*d^2 + 5*a^10*b^5*C*d^2 + (13*I)*a^9*b^6*C*d^
2 + 13*a^8*b^7*C*d^2 + (15*I)*a^7*b^8*C*d^2 + 15*a^6*b^9*C*d^2 + (6*I)*a^5*b^10*C*d^2 + 6*a^4*b^11*C*d^2)*(e +
f*x)*Sec[e + f*x]*(a*Cos[e + f*x] + b*Sin[e + f*x])^3*(c + d*Tan[e + f*x])^2)/(a^2*(a - I*b)^6*(a + I*b)^5*b^
5*f*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^3) - (I*(3*a^2*A*b^4*c^2 - A*b^6*c^2 - a^3*b^3*B*
c^2 + 3*a*b^5*B*c^2 - 3*a^2*b^4*c^2*C + b^6*c^2*C - 2*a^3*A*b^3*c*d + 6*a*A*b^5*c*d - 6*a^2*b^4*B*c*d + 2*b^6*
B*c*d + 2*a^3*b^3*c*C*d - 6*a*b^5*c*C*d - 3*a^2*A*b^4*d^2 + A*b^6*d^2 + a^3*b^3*B*d^2 - 3*a*b^5*B*d^2 + a^6*C*
d^2 + 3*a^4*b^2*C*d^2 + 6*a^2*b^4*C*d^2)*ArcTan[Tan[e + f*x]]*Sec[e + f*x]*(a*Cos[e + f*x] + b*Sin[e + f*x])^3
*(c + d*Tan[e + f*x])^2)/(b^3*(a^2 + b^2)^3*f*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^3) - (C
*d^2*Log[Cos[e + f*x]]*Sec[e + f*x]*(a*Cos[e + f*x] + b*Sin[e + f*x])^3*(c + d*Tan[e + f*x])^2)/(b^3*f*(c*Cos[
e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^3) + ((3*a^2*A*b^4*c^2 - A*b^6*c^2 - a^3*b^3*B*c^2 + 3*a*b^5
*B*c^2 - 3*a^2*b^4*c^2*C + b^6*c^2*C - 2*a^3*A*b^3*c*d + 6*a*A*b^5*c*d - 6*a^2*b^4*B*c*d + 2*b^6*B*c*d + 2*a^3
*b^3*c*C*d - 6*a*b^5*c*C*d - 3*a^2*A*b^4*d^2 + A*b^6*d^2 + a^3*b^3*B*d^2 - 3*a*b^5*B*d^2 + a^6*C*d^2 + 3*a^4*b
^2*C*d^2 + 6*a^2*b^4*C*d^2)*Log[(a*Cos[e + f*x] + b*Sin[e + f*x])^2]*Sec[e + f*x]*(a*Cos[e + f*x] + b*Sin[e +
f*x])^3*(c + d*Tan[e + f*x])^2)/(2*b^3*(a^2 + b^2)^3*f*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x]
)^3) + (Sec[e + f*x]*(a*Cos[e + f*x] + b*Sin[e + f*x])^2*(3*a*A*b^4*c^2*Sin[e + f*x] - 2*a^2*b^3*B*c^2*Sin[e +
f*x] + b^5*B*c^2*Sin[e + f*x] + a^3*b^2*c^2*C*Sin[e + f*x] - 2*a*b^4*c^2*C*Sin[e + f*x] - 4*a^2*A*b^3*c*d*Sin
[e + f*x] + 2*A*b^5*c*d*Sin[e + f*x] + 2*a^3*b^2*B*c*d*Sin[e + f*x] - 4*a*b^4*B*c*d*Sin[e + f*x] + 6*a^2*b^3*c
*C*d*Sin[e + f*x] + a^3*A*b^2*d^2*Sin[e + f*x] - 2*a*A*b^4*d^2*Sin[e + f*x] + 3*a^2*b^3*B*d^2*Sin[e + f*x] - a
^5*C*d^2*Sin[e + f*x] - 4*a^3*b^2*C*d^2*Sin[e + f*x])*(c + d*Tan[e + f*x])^2)/(a*(a - I*b)^2*(a + I*b)^2*b^2*f
*(c*Cos[e + f*x] + d*Sin[e + f*x])^2*(a + b*Tan[e + f*x])^3)
________________________________________________________________________________________
fricas [B] time = 2.65, size = 1699, normalized size = 2.85 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^3,x, algorithm="fricas")
[Out]
-1/2*((3*C*a^4*b^4 - 5*B*a^3*b^5 + (7*A - 3*C)*a^2*b^6 + B*a*b^7 + A*b^8)*c^2 - 2*(C*a^5*b^3 - 3*B*a^4*b^4 + 5
*(A - C)*a^3*b^5 + 3*B*a^2*b^6 - A*a*b^7)*c*d - (C*a^6*b^2 + B*a^5*b^3 - (3*A - 7*C)*a^4*b^4 - 5*B*a^3*b^5 + 3
*A*a^2*b^6)*d^2 - 2*(((A - C)*a^5*b^3 + 3*B*a^4*b^4 - 3*(A - C)*a^3*b^5 - B*a^2*b^6)*c^2 - 2*(B*a^5*b^3 - 3*(A
- C)*a^4*b^4 - 3*B*a^3*b^5 + (A - C)*a^2*b^6)*c*d - ((A - C)*a^5*b^3 + 3*B*a^4*b^4 - 3*(A - C)*a^3*b^5 - B*a^
2*b^6)*d^2)*f*x - ((C*a^4*b^4 - 3*B*a^3*b^5 + 5*(A - C)*a^2*b^6 + 3*B*a*b^7 - A*b^8)*c^2 + 2*(C*a^5*b^3 + B*a^
4*b^4 - (3*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x + e)^2 + 1)) + ((C*a^6*b^2 + 3*C*a^4*b^4 + 3*C*a^2*b^6 + C*b^8)*d^2*tan(f*x + e)^2 +
2*(C*a^7*b + 3*C*a^5*b^3 + 3*C*a^3*b^5 + C*a*b^7)*d^2*tan(f*x + e) + (C*a^8 + 3*C*a^6*b^2 + 3*C*a^4*b^4 + C*a
^2*b^6)*d^2)*log(1/(tan(f*x + e)^2 + 1)) - 2*((C*a^5*b^3 - 2*B*a^4*b^4 + 3*(A - C)*a^3*b^5 + 3*B*a^2*b^6 - (3*
A - 2*C)*a*b^7 - B*b^8)*c^2 + 2*(B*a^5*b^3 - (2*A - 3*C)*a^4*b^4 - 3*B*a^3*b^5 + 3*(A - C)*a^2*b^6 + 2*B*a*b^7
- A*b^8)*c*d - (C*a^7*b - (A - 3*C)*a^5*b^3 - 3*B*a^4*b^4 + (3*A - 4*C)*a^3*b^5 + 3*B*a^2*b^6 - 2*A*a*b^7)*d^
2 + 2*(((A - C)*a^4*b^4 + 3*B*a^3*b^5 - 3*(A - C)*a^2*b^6 - B*a*b^7)*c^2 - 2*(B*a^4*b^4 - 3*(A - C)*a^3*b^5 -
3*B*a^2*b^6 + (A - C)*a*b^7)*c*d - ((A - C)*a^4*b^4 + 3*B*a^3*b^5 - 3*(A - C)*a^2*b^6 - B*a*b^7)*d^2)*f*x)*tan
(f*x + e))/((a^6*b^5 + 3*a^4*b^7 + 3*a^2*b^9 + b^11)*f*tan(f*x + e)^2 + 2*(a^7*b^4 + 3*a^5*b^6 + 3*a^3*b^8 + a
*b^10)*f*tan(f*x + e) + (a^8*b^3 + 3*a^6*b^5 + 3*a^4*b^7 + a^2*b^9)*f)
________________________________________________________________________________________
giac [B] time = 2.70, size = 1714, normalized size = 2.87 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^3,x, algorithm="giac")
[Out]
1/2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2*b^5*c^2*tan(f*x +
e)^2 - 9*B*a*b^6*c^2*tan(f*x + e)^2 + 3*A*b^7*c^2*tan(f*x + e)^2 - 3*C*b^7*c^2*tan(f*x + e)^2 + 6*A*a^3*b^4*c
*d*tan(f*x + e)^2 - 6*C*a^3*b^4*c*d*tan(f*x + e)^2 + 18*B*a^2*b^5*c*d*tan(f*x + e)^2 - 18*A*a*b^6*c*d*tan(f*x
+ e)^2 + 18*C*a*b^6*c*d*tan(f*x + e)^2 - 6*B*b^7*c*d*tan(f*x + e)^2 - 3*C*a^6*b*d^2*tan(f*x + e)^2 - 9*C*a^4*b
^3*d^2*tan(f*x + e)^2 - 3*B*a^3*b^4*d^2*tan(f*x + e)^2 + 9*A*a^2*b^5*d^2*tan(f*x + e)^2 - 18*C*a^2*b^5*d^2*tan
(f*x + e)^2 + 9*B*a*b^6*d^2*tan(f*x + e)^2 - 3*A*b^7*d^2*tan(f*x + e)^2 + 8*B*a^4*b^3*c^2*tan(f*x + e) - 22*A*
a^3*b^4*c^2*tan(f*x + e) + 22*C*a^3*b^4*c^2*tan(f*x + e) - 18*B*a^2*b^5*c^2*tan(f*x + e) + 2*A*a*b^6*c^2*tan(f
*x + e) - 2*C*a*b^6*c^2*tan(f*x + e) - 2*B*b^7*c^2*tan(f*x + e) - 4*C*a^6*b*c*d*tan(f*x + e) + 16*A*a^4*b^3*c*
d*tan(f*x + e) - 28*C*a^4*b^3*c*d*tan(f*x + e) + 44*B*a^3*b^4*c*d*tan(f*x + e) - 36*A*a^2*b^5*c*d*tan(f*x + e)
+ 24*C*a^2*b^5*c*d*tan(f*x + e) - 4*B*a*b^6*c*d*tan(f*x + e) - 4*A*b^7*c*d*tan(f*x + e) - 2*C*a^7*d^2*tan(f*x
+ e) - 2*B*a^6*b*d^2*tan(f*x + e) - 6*C*a^5*b^2*d^2*tan(f*x + e) - 14*B*a^4*b^3*d^2*tan(f*x + e) + 22*A*a^3*b
^4*d^2*tan(f*x + e) - 28*C*a^3*b^4*d^2*tan(f*x + e) + 12*B*a^2*b^5*d^2*tan(f*x + e) - 2*A*a*b^6*d^2*tan(f*x +
e) - C*a^6*b*c^2 + 6*B*a^5*b^2*c^2 - 14*A*a^4*b^3*c^2 + 11*C*a^4*b^3*c^2 - 7*B*a^3*b^4*c^2 - 3*A*a^2*b^5*c^2 -
B*a*b^6*c^2 - A*b^7*c^2 - 2*C*a^7*c*d - 2*B*a^6*b*c*d + 12*A*a^5*b^2*c*d - 18*C*a^5*b^2*c*d + 22*B*a^4*b^3*c*
d - 14*A*a^3*b^4*c*d + 8*C*a^3*b^4*c*d - 2*A*a*b^6*c*d - B*a^7*d^2 - A*a^6*b*d^2 + C*a^6*b*d^2 - 9*B*a^5*b^2*d
^2 + 11*A*a^4*b^3*d^2 - 11*C*a^4*b^3*d^2 + 4*B*a^3*b^4*d^2)/((a^6*b^2 + 3*a^4*b^4 + 3*a^2*b^6 + b^8)*(b*tan(f*
x + e) + a)^2))/f
________________________________________________________________________________________
maple [B] time = 0.33, size = 2465, normalized size = 4.13 \[ \text {Expression too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^3,x)
[Out]
-3/f/(a^2+b^2)^3*b*ln(a+b*tan(f*x+e))*A*a^2*d^2+3/f/(a^2+b^2)^3*b^2*ln(a+b*tan(f*x+e))*a*B*c^2-3/f/(a^2+b^2)^3
*b^2*ln(a+b*tan(f*x+e))*B*a*d^2+2/f/(a^2+b^2)^3*b^3*ln(a+b*tan(f*x+e))*B*c*d+1/f/(a^2+b^2)^3/b^3*ln(a+b*tan(f*
x+e))*a^6*C*d^2+3/f/(a^2+b^2)^3/b*ln(a+b*tan(f*x+e))*a^4*C*d^2-3/f/(a^2+b^2)^3*b*ln(a+b*tan(f*x+e))*C*a^2*c^2+
6/f/(a^2+b^2)^3*b*ln(a+b*tan(f*x+e))*C*a^2*d^2-6/f/(a^2+b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+e))^2*A*a^2*d^2+3/f/(a^2+b^2)^3*b*ln(a+b*tan(f*x+e))*A*a^2*c^2-1/f/(a^2+b^2)^3*B*arctan(tan(f*x+e))*b^3*c^2+
1/f/(a^2+b^2)^3*B*arctan(tan(f*x+e))*b^3*d^2-1/f/(a^2+b^2)^3*C*arctan(tan(f*x+e))*a^3*c^2+1/f/(a^2+b^2)^3*C*ar
ctan(tan(f*x+e))*a^3*d^2+1/f/(a^2+b^2)^2/(a+b*tan(f*x+e))*B*a^2*c^2+1/2/f/(a^2+b^2)/(a+b*tan(f*x+e))^2*B*a*c^2
-3/f/(a^2+b^2)^2/(a+b*tan(f*x+e))*B*a^2*d^2-1/f/(a^2+b^2)^3*ln(a+b*tan(f*x+e))*B*a^3*c^2+1/f/(a^2+b^2)^3*ln(a+
b*tan(f*x+e))*B*a^3*d^2-1/2/f*b/(a^2+b^2)/(a+b*tan(f*x+e))^2*A*c^2+1/2/f/(a^2+b^2)^3*ln(1+tan(f*x+e)^2)*A*b^3*
c^2-1/2/f/(a^2+b^2)^3*ln(1+tan(f*x+e)^2)*A*b^3*d^2+1/2/f/(a^2+b^2)^3*ln(1+tan(f*x+e)^2)*B*a^3*c^2-1/2/f/(a^2+b
^2)^3*ln(1+tan(f*x+e)^2)*B*a^3*d^2-1/2/f/(a^2+b^2)^3*ln(1+tan(f*x+e)^2)*C*b^3*c^2+1/2/f/(a^2+b^2)^3*ln(1+tan(f
*x+e)^2)*C*b^3*d^2+1/f/(a^2+b^2)^3*A*arctan(tan(f*x+e))*a^3*c^2-1/f/(a^2+b^2)^3*A*arctan(tan(f*x+e))*a^3*d^2-1
/f*b^2/(a^2+b^2)^2/(a+b*tan(f*x+e))*B*c^2-1/f/(a^2+b^2)^3*b^3*ln(a+b*tan(f*x+e))*A*c^2+1/f/(a^2+b^2)^3*b^3*ln(
a+b*tan(f*x+e))*A*d^2+1/f/(a^2+b^2)^3*b^3*ln(a+b*tan(f*x+e))*C*c^2
________________________________________________________________________________________
maxima [A] time = 0.57, size = 839, normalized size = 1.41 \[ \frac {\frac {2 \, {\left ({\left ({\left (A - C\right )} a^{3} + 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} - B b^{3}\right )} c^{2} - 2 \, {\left (B a^{3} - 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} + {\left (A - C\right )} b^{3}\right )} c d - {\left ({\left (A - C\right )} a^{3} + 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} - B b^{3}\right )} d^{2}\right )} {\left (f x + e\right )}}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {2 \, {\left ({\left (B a^{3} b^{3} - 3 \, {\left (A - C\right )} a^{2} b^{4} - 3 \, B a b^{5} + {\left (A - C\right )} b^{6}\right )} c^{2} + 2 \, {\left ({\left (A - C\right )} a^{3} b^{3} + 3 \, B a^{2} b^{4} - 3 \, {\left (A - C\right )} a b^{5} - B b^{6}\right )} c d - {\left (C a^{6} + 3 \, C a^{4} b^{2} + B a^{3} b^{3} - 3 \, {\left (A - 2 \, C\right )} a^{2} b^{4} - 3 \, B a b^{5} + A b^{6}\right )} d^{2}\right )} \log \left (b \tan \left (f x + e\right ) + a\right )}{a^{6} b^{3} + 3 \, a^{4} b^{5} + 3 \, a^{2} b^{7} + b^{9}} + \frac {{\left ({\left (B a^{3} - 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} + {\left (A - C\right )} b^{3}\right )} c^{2} + 2 \, {\left ({\left (A - C\right )} a^{3} + 3 \, B a^{2} b - 3 \, {\left (A - C\right )} a b^{2} - B b^{3}\right )} c d - {\left (B a^{3} - 3 \, {\left (A - C\right )} a^{2} b - 3 \, B a b^{2} + {\left (A - C\right )} b^{3}\right )} d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {{\left (C a^{4} b^{2} - 3 \, B a^{3} b^{3} + {\left (5 \, A - 3 \, C\right )} a^{2} b^{4} + B a b^{5} + A b^{6}\right )} c^{2} + 2 \, {\left (C a^{5} b + B a^{4} b^{2} - {\left (3 \, A - 5 \, C\right )} a^{3} b^{3} - 3 \, B a^{2} b^{4} + A a b^{5}\right )} c d - {\left (3 \, C a^{6} - B a^{5} b - {\left (A - 7 \, C\right )} a^{4} b^{2} - 5 \, B a^{3} b^{3} + 3 \, A a^{2} b^{4}\right )} d^{2} - 2 \, {\left ({\left (B a^{2} b^{4} - 2 \, {\left (A - C\right )} a b^{5} - B b^{6}\right )} c^{2} - 2 \, {\left (C a^{4} b^{2} - {\left (A - 3 \, C\right )} a^{2} b^{4} - 2 \, B a b^{5} + A b^{6}\right )} c d + {\left (2 \, C a^{5} b - B a^{4} b^{2} + 4 \, C a^{3} b^{3} - 3 \, B a^{2} b^{4} + 2 \, A a b^{5}\right )} d^{2}\right )} \tan \left (f x + e\right )}{a^{6} b^{3} + 2 \, a^{4} b^{5} + a^{2} b^{7} + {\left (a^{4} b^{5} + 2 \, a^{2} b^{7} + b^{9}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left (a^{5} b^{4} + 2 \, a^{3} b^{6} + a b^{8}\right )} \tan \left (f x + e\right )}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan(f*x+e))^3,x, algorithm="maxima")
[Out]
1/2*(2*(((A - C)*a^3 + 3*B*a^2*b - 3*(A - C)*a*b^2 - B*b^3)*c^2 - 2*(B*a^3 - 3*(A - C)*a^2*b - 3*B*a*b^2 + (A
- C)*b^3)*c*d - ((A - C)*a^3 + 3*B*a^2*b - 3*(A - C)*a*b^2 - B*b^3)*d^2)*(f*x + e)/(a^6 + 3*a^4*b^2 + 3*a^2*b^
4 + b^6) - 2*((B*a^3*b^3 - 3*(A - C)*a^2*b^4 - 3*B*a*b^5 + (A - C)*b^6)*c^2 + 2*((A - C)*a^3*b^3 + 3*B*a^2*b^4
- 3*(A - C)*a*b^5 - B*b^6)*c*d - (C*a^6 + 3*C*a^4*b^2 + B*a^3*b^3 - 3*(A - 2*C)*a^2*b^4 - 3*B*a*b^5 + A*b^6)*
d^2)*log(b*tan(f*x + e) + a)/(a^6*b^3 + 3*a^4*b^5 + 3*a^2*b^7 + b^9) + ((B*a^3 - 3*(A - C)*a^2*b - 3*B*a*b^2 +
(A - C)*b^3)*c^2 + 2*((A - C)*a^3 + 3*B*a^2*b - 3*(A - C)*a*b^2 - B*b^3)*c*d - (B*a^3 - 3*(A - C)*a^2*b - 3*B
*a*b^2 + (A - C)*b^3)*d^2)*log(tan(f*x + e)^2 + 1)/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6) - ((C*a^4*b^2 - 3*B*a^3
*b^3 + (5*A - 3*C)*a^2*b^4 + B*a*b^5 + A*b^6)*c^2 + 2*(C*a^5*b + B*a^4*b^2 - (3*A - 5*C)*a^3*b^3 - 3*B*a^2*b^4
+ A*a*b^5)*c*d - (3*C*a^6 - B*a^5*b - (A - 7*C)*a^4*b^2 - 5*B*a^3*b^3 + 3*A*a^2*b^4)*d^2 - 2*((B*a^2*b^4 - 2*
(A - C)*a*b^5 - B*b^6)*c^2 - 2*(C*a^4*b^2 - (A - 3*C)*a^2*b^4 - 2*B*a*b^5 + A*b^6)*c*d + (2*C*a^5*b - B*a^4*b^
2 + 4*C*a^3*b^3 - 3*B*a^2*b^4 + 2*A*a*b^5)*d^2)*tan(f*x + e))/(a^6*b^3 + 2*a^4*b^5 + a^2*b^7 + (a^4*b^5 + 2*a^
2*b^7 + b^9)*tan(f*x + e)^2 + 2*(a^5*b^4 + 2*a^3*b^6 + a*b^8)*tan(f*x + e)))/f
________________________________________________________________________________________
mupad [B] time = 29.28, size = 807, normalized size = 1.35 \[ -\frac {\ln \left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (\frac {a^2\,\left (b^4\,\left (3\,A\,d^2-3\,A\,c^2+3\,C\,c^2-6\,C\,d^2+6\,B\,c\,d\right )+3\,C\,b^4\,d^2\right )-b^6\,\left (A\,d^2-A\,c^2+C\,c^2+2\,B\,c\,d\right )+C\,b^6\,d^2-a\,b^5\,\left (3\,B\,c^2-3\,B\,d^2+6\,A\,c\,d-6\,C\,c\,d\right )+a^3\,b^3\,\left (B\,c^2-B\,d^2+2\,A\,c\,d-2\,C\,c\,d\right )}{a^6\,b^3+3\,a^4\,b^5+3\,a^2\,b^7+b^9}-\frac {C\,d^2}{b^3}\right )}{f}-\frac {\frac {A\,b^6\,c^2-3\,C\,a^6\,d^2+B\,a\,b^5\,c^2+B\,a^5\,b\,d^2+5\,A\,a^2\,b^4\,c^2-3\,A\,a^2\,b^4\,d^2+A\,a^4\,b^2\,d^2-3\,B\,a^3\,b^3\,c^2+5\,B\,a^3\,b^3\,d^2-3\,C\,a^2\,b^4\,c^2+C\,a^4\,b^2\,c^2-7\,C\,a^4\,b^2\,d^2+2\,A\,a\,b^5\,c\,d+2\,C\,a^5\,b\,c\,d-6\,A\,a^3\,b^3\,c\,d-6\,B\,a^2\,b^4\,c\,d+2\,B\,a^4\,b^2\,c\,d+10\,C\,a^3\,b^3\,c\,d}{2\,b^3\,\left (a^4+2\,a^2\,b^2+b^4\right )}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (B\,b^5\,c^2-2\,C\,a^5\,d^2+2\,A\,b^5\,c\,d+2\,A\,a\,b^4\,c^2-2\,A\,a\,b^4\,d^2+B\,a^4\,b\,d^2-2\,C\,a\,b^4\,c^2-B\,a^2\,b^3\,c^2+3\,B\,a^2\,b^3\,d^2-4\,C\,a^3\,b^2\,d^2-4\,B\,a\,b^4\,c\,d+2\,C\,a^4\,b\,c\,d-2\,A\,a^2\,b^3\,c\,d+6\,C\,a^2\,b^3\,c\,d\right )}{b^2\,\left (a^4+2\,a^2\,b^2+b^4\right )}}{f\,\left (a^2+2\,a\,b\,\mathrm {tan}\left (e+f\,x\right )+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^2\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (B\,c^2-B\,d^2+2\,A\,c\,d-2\,C\,c\,d-A\,c^2\,1{}\mathrm {i}+A\,d^2\,1{}\mathrm {i}+C\,c^2\,1{}\mathrm {i}-C\,d^2\,1{}\mathrm {i}+B\,c\,d\,2{}\mathrm {i}\right )}{2\,f\,\left (-a^3-a^2\,b\,3{}\mathrm {i}+3\,a\,b^2+b^3\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (A\,d^2-A\,c^2+B\,c^2\,1{}\mathrm {i}-B\,d^2\,1{}\mathrm {i}+C\,c^2-C\,d^2+A\,c\,d\,2{}\mathrm {i}+2\,B\,c\,d-C\,c\,d\,2{}\mathrm {i}\right )}{2\,f\,\left (-a^3\,1{}\mathrm {i}-3\,a^2\,b+a\,b^2\,3{}\mathrm {i}+b^3\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(((c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2))/(a + b*tan(e + f*x))^3,x)
[Out]
- (log(a + b*tan(e + f*x))*((a^2*(b^4*(3*A*d^2 - 3*A*c^2 + 3*C*c^2 - 6*C*d^2 + 6*B*c*d) + 3*C*b^4*d^2) - b^6*(
A*d^2 - A*c^2 + C*c^2 + 2*B*c*d) + C*b^6*d^2 - a*b^5*(3*B*c^2 - 3*B*d^2 + 6*A*c*d - 6*C*c*d) + a^3*b^3*(B*c^2
- B*d^2 + 2*A*c*d - 2*C*c*d))/(b^9 + 3*a^2*b^7 + 3*a^4*b^5 + a^6*b^3) - (C*d^2)/b^3))/f - ((A*b^6*c^2 - 3*C*a^
6*d^2 + B*a*b^5*c^2 + B*a^5*b*d^2 + 5*A*a^2*b^4*c^2 - 3*A*a^2*b^4*d^2 + A*a^4*b^2*d^2 - 3*B*a^3*b^3*c^2 + 5*B*
a^3*b^3*d^2 - 3*C*a^2*b^4*c^2 + C*a^4*b^2*c^2 - 7*C*a^4*b^2*d^2 + 2*A*a*b^5*c*d + 2*C*a^5*b*c*d - 6*A*a^3*b^3*
c*d - 6*B*a^2*b^4*c*d + 2*B*a^4*b^2*c*d + 10*C*a^3*b^3*c*d)/(2*b^3*(a^4 + b^4 + 2*a^2*b^2)) + (tan(e + f*x)*(B
*b^5*c^2 - 2*C*a^5*d^2 + 2*A*b^5*c*d + 2*A*a*b^4*c^2 - 2*A*a*b^4*d^2 + B*a^4*b*d^2 - 2*C*a*b^4*c^2 - B*a^2*b^3
*c^2 + 3*B*a^2*b^3*d^2 - 4*C*a^3*b^2*d^2 - 4*B*a*b^4*c*d + 2*C*a^4*b*c*d - 2*A*a^2*b^3*c*d + 6*C*a^2*b^3*c*d))
/(b^2*(a^4 + b^4 + 2*a^2*b^2)))/(f*(a^2 + b^2*tan(e + f*x)^2 + 2*a*b*tan(e + f*x))) - (log(tan(e + f*x) - 1i)*
(A*d^2*1i - A*c^2*1i + B*c^2 - B*d^2 + C*c^2*1i - C*d^2*1i + 2*A*c*d + B*c*d*2i - 2*C*c*d))/(2*f*(3*a*b^2 - a^
2*b*3i - a^3 + b^3*1i)) - (log(tan(e + f*x) + 1i)*(A*d^2 - A*c^2 + B*c^2*1i - B*d^2*1i + C*c^2 - C*d^2 + A*c*d
*2i + 2*B*c*d - C*c*d*2i))/(2*f*(a*b^2*3i - 3*a^2*b - a^3*1i + b^3))
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: AttributeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((c+d*tan(f*x+e))**2*(A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(a+b*tan(f*x+e))**3,x)
[Out]
Exception raised: AttributeError
________________________________________________________________________________________